package net.siufung.market.base.app.controller.regulation;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.siufung.core.model.regulation.AbstractRegulation;
import net.siufung.market.base.app.controller.model.appMenu.AppMenuSaveBatchDto;
import net.siufung.market.base.app.controller.model.appMenu.AppMenuSaveDto;
import net.siufung.market.base.app.mapper.IAppMenuMapper;

/**
 * @author 陈建峰
 * @date 2023/8/3 2:01 PM
 * @since V1.0.0
 */
public class AppMenuRegulation {

    @Slf4j
    @AllArgsConstructor
    public static class Save extends AbstractRegulation<AppMenuSaveDto> {

        private static final long serialVersionUID = 1L;

        private final IAppMenuMapper sysAppMenuMapper;

        @Override
        public boolean isSatisfiedBy(AppMenuSaveDto sysAppMenuSaveDto) {
            return Boolean.TRUE;
        }
    }

    @Slf4j
    @AllArgsConstructor
    public static class SaveBatch extends AbstractRegulation<AppMenuSaveBatchDto> {

        private static final long serialVersionUID = 1L;

        private final IAppMenuMapper appMenuMapper;

        @Override
        public boolean isSatisfiedBy(AppMenuSaveBatchDto appMenuBatchSaveDto) {
            // 校验是否有多个appId
            return Boolean.TRUE;
        }
    }

    @Slf4j
    @AllArgsConstructor
    public static class Remove extends AbstractRegulation<Integer> {

        private static final long serialVersionUID = 1L;

        private final IAppMenuMapper appMenuMapper;

        @Override
        public boolean isSatisfiedBy(Integer integer) {
            return Boolean.TRUE;
        }
    }


}
